#pragma once
#include "Texture.h"

class SpriteSheet : public Texture
{
protected:
	TemplateVector<RECT> m_rects;
	int m_index;
	int m_rows;
	int m_columns;
public:
	SpriteSheet();
	~SpriteSheet();
	void release();
	void initialize(LPCWSTR fileName, int count, int numRows, int numColumns, int spriteWidth, int spriteHeight, bool relativeToCamera);
	bool setCurrentSprite(int index);
	virtual void draw(V2DF pos, float rotAngle, float scale);
	int getCurrentSprite() { return m_index; }
	int getImageCount() { return m_rects.size(); }
	int SpriteHeight() { return m_rects.get(0).bottom; }
	int SpriteWidth() { return m_rects.get(0).right; }
	int rows() { return m_rows; }
	int columns() { return m_columns; }
	void setViewRect(RECT a_viewRect);
};